{* Smarty *}

{include file="header.tpl"}
<div id="main">
	<div id="mainbar-full">
		{include file="sub-header.tpl"}
		{if $content.current_tab == 'profile'}
		<form action="/dr-admin/dr-page-editinfo.php" method="post">

			<p><label>用户名</label></p>
			<p>
				<b>{$user.username}</b>
				<input type="hidden" name="username" id="username" value="{$user.username}"/>
			</p>


			<p><label>昵称</label></p>
			<p><input type="text" name="nickname" id="nickname" value="{$user.nickname}"/></p>

			<p><label>邮箱</label></p>
			<p>
				<b>{$user.email}</b>
				<small>你的邮箱将不会显示给他人。</small>
				<input type="hidden" name="email" id="email" value="{$user.email}"/>
			</p>

			<p><label>真实姓名</label></p>
			<p><input type="text" name="realname" id="realname" value="{$user.realname}"/></p>

			<p><label>性别</label></p>
			<p>
				<select name="gender" id="gender">
				{if $user.gender == "male"}
					<option value="">Secret</option>
					<option value="male" selected="selected">
						Male
					</option>
					<option value="female">Female</option>
					{elseif $user.gender == 'female'}
					<option value="">Secret</option>
					<option value="male">Male</option>
					<option value="female" selected="selected">
						Female
					</option>
					{else}
					<option value="" selected="selected">
						Secret
					</option>
					<option value="male">Male</option>
					<option value="female">Female</option>
				{/if}
				</select>
			</p>

			<p><label>生日</label></p>
			<p>
				<input type="text" name="birthday" id="birthday" value="{$user.birthday}"/> <small>yyyy/mm/dd</small>
				<br />
				<small>你的生日不会显示给他人，用来计算并显示你的年龄。</small>
			</p>

			<p><label>网站</label></p>
			<p><input type="text" name="website" id="website" value="{$user.website}"/></p>

			<p><label>地址</label></p>
			<p><input type="text" name="location" id="location" value="{$user.location}"/></p>

			<p><label>个人简介</label></p>
			<p><textarea name="aboutme" id="aboutme" rows="11" cols="77">{$user.aboutme}</textarea></p>

			<p>
				<input name="submit" id="submit" type="submit" value="保存修改"/>
				<input type="button" name="cancel" id="cancel" value="取消修改" onclick="history.back(-1);"/>
			</p>
		</form>
		{else}
		<p><a href="/">iDaren</a>当前使用用户的邮箱对应的<a href="http://www.gravatar.com/">Gravatar</a>头像作为系统内显示的头像，如果你想变更自己的头像，请登陆到<a href="http://www.gravatar.com/">Gravatar</a>进行相应的设置。</p>
		<h2>两种情形：</h2>
		<ul>
		<li><p>你从没有使用过<a href="http://www.gravatar.com/">Gravatar</a>，那么请到<a href="http://www.gravatar.com/">Gravatar</a>注册个新账户，并设置自己的头像。</p></li>
		<li><p>你使用过<a href="http://www.gravatar.com/">Gravatar</a>，那么请登陆到<a href="http://www.gravatar.com/">Gravatar</a>自行进行变更。</p></li>
			</ul>
		{/if}
	</div>
</div>
{include file="footer.tpl"}